export default {
  install(Vue) {
    Vue.filter('sliceTime', function(val) {
      return val.slice(0, 4)
    })

    Vue.directive('fbind', {
      bind(element, binding) {
        element.value = binding.value
      },
      inserted(element) {
        element.focus()
      },
      update(element, binding) {
        element.value = binding.value
        element.focus()
      }
    })

    Vue.mixin({
      mounted() {
        console.log('mixin2') 
      }
    })

    Vue.prototype.$myMethod = function() {
      console.log('rice')
    }
  }
}